<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
<title>Simulation</title>
</head>
<body>
<p><a href="./ratingTool">Rating Tool</a></p>
<table border="5">
<tr>
<th><b>Winner:${teamAwins}</b></th>
</tr>
</table>
<table border="5">
<tr>
<th><b>Chance of win for team A based on SKILL was: ${teamAchance}% -- Skill A:${teamAskill} vs B:${teamBskill}</b></th>
</tr>
</table>
<table border="5">
<tr>
<th><b>Chance of win for team A based on RATING was: ${teamAchanceRating}% -- Rating A:${teamArating} vs B:${teamBrating}</b></th>
</tr>
</table>
<table border="1">
<tr>
<th>Team A</th>
<th>Name</th>
<th>Skill=${teamAskill}</th>
<th>Rating</th>
<th>PlacementLeft</th>
<th>GamesPlayed</th>
<th>Wins</th>
<th>RatingChange</th>
<th>winsInARow</th>
</tr>
<c:forEach items="${teamAplayers}" var="player">
<tr>
<td>${player.id}</td>
<td>${player.name}</td>
<td>${player.skill}</td>
<td>${player.rating}</td>
<td>${player.placementLeft}</td>
<td>${player.gamesPlayed}</td>
<td>${player.wins}</td>
<td>${player.lastRatingChange}</td>
<td>${player.winsInARow}</td>

</tr>
</c:forEach>
</table>
<br/>
<table border="1">
<tr>
<th>Team B</th>
<th>Name</th>
<th>Skill=${teamBskill}</th>
<th>Rating</th>
<th>PlacementLeft</th>
<th>GamesPlayed</th>
<th>Wins</th>
<th>RatingChange</th>
<th>winsInARow</th>
</tr>
<c:forEach items="${teamBplayers}" var="player">
<tr>
<td>${player.id}</td>
<td>${player.name}</td>
<td>${player.skill}</td>
<td>${player.rating}</td>
<td>${player.placementLeft}</td>
<td>${player.gamesPlayed}</td>
<td>${player.wins}</td>
<td>${player.lastRatingChange}</td>
<td>${player.winsInARow}</td>
</tr>
</c:forEach>
</table>
<br/>
<caption><b>Before matchmaking</b></caption>
<table border="3">
<tr>
<th>id</th>
<th>Name</th>
<th>Skill</th>
<th>Rating</th>
<th>PlacementLeft</th>
<th>GamesPlayed</th>
<th>Wins</th>
<th>LastRatingChange</th>
<th>winsInARow</th>
</tr>
<c:forEach items="${foundPlayers}" var="player">
<tr>
<td>${player.id}</td>
<td>${player.name}</td>
<td>${player.skill}</td>
<td>${player.rating}</td>
<td>${player.placementLeft}</td>
<td>${player.gamesPlayed}</td>
<td>${player.wins}</td>
<td>${player.lastRatingChange}</td>
<td>${player.winsInARow}</td>
</tr>
</c:forEach>
</table>
</body>
</html>